home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 October / MACPOWER-1997-10.ISO.7z / MACPOWER-1997-10.ISO / AMUG / PROGRAMMING / Mac F2C 1.3.5.sit / Mac F2C 1.3.5 / Mac F2C Libraries / libF77 Sources / c_exp.c < prev    next >
C/C++ Source or Header  |  1995-01-28  |  270b  |  20 lines

  1. #include "f2c.h"
  2.  
  3. #ifdef KR_headers
  4. extern double exp(), cos(), sin();
  5.  
  6.  VOID c_exp(r, z) complex *r, *z;
  7. #else
  8. #undef abs
  9. #include "math.h"
  10.  
  11. void c_exp(complex *r, complex *z)
  12. #endif
  13. {
  14. double expx;
  15.  
  16. expx = exp(z->r);
  17. r->r = expx * cos(z->i);
  18. r->i = expx * sin(z->i);
  19. }
  20.